home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
systems
/
web2c
/
web2c.next.help
< prev
next >
Wrap
Internet Message Format
|
1994-12-08
|
18KB
From: swift@acs.bu.edu (Matthew Swift)
Date: Fri, 09 Dec 94 10:30:22 -0500
Subject: help and patch for NeXT computers <- I mean NeXTStep
I changed one phrase here at the end of the first line from what's on
CTAN: "a NeXT" to "NeXTStep" -- I keep equating them when I don't mean to.
I also could skip a step by using "tail" to skip the first part of this file
for the patch program (it was too long). I just thought of that solution.
---------------snip
This file explains how to compile Karl Berry's web2c TeX sources on NeXTStep.
It contains a patch for the NeXT texview program and Make_Fonts script.
This has been tested on a NeXT Cube with NS 3.0 and gcc 2.5.4, bison 1.22, and
flex 2.4.6.
* FILES YOU NEED TO START
++ $GNU is a GNU site or a mirror. Please use the one closest to you. A long
list of partial and full mirrors is given in your GNU Emacs /etc/FTP file.
The US sites from that file, dated 21 Apr 93 (old, I know), are given below,
with some ones I know are good near the top.
ASIA: ftp.cs.titech.ac.jp, utsun.s.u-tokyo.ac.jp:/ftpsync/prep,
cair.kaist.ac.kr:/pub/gnu, ftp.nectec.or.th:/pub/mirrors/gnu
AUSTRALIA: archie.au:/gnu (archie.oz or archie.oz.au for ACSnet)
AFRICA: ftp.sun.ac.za:/pub/gnu
MIDDLE-EAST: ftp.technion.ac.il:/pub/unsupported/gnu
EUROPE: irisa.irisa.fr:/pub/gnu, ftp.univ-lyon1.fr:pub/gnu,
ftp.mcc.ac.uk, unix.hensa.ac.uk:/pub/uunet/systems/gnu,
src.doc.ic.ac.uk:/gnu, ftp.ieunet.ie:pub/gnu, ftp.eunet.ch,
nic.switch.ch:/mirror/gnu, ftp.informatik.rwth-aachen.de:/pub/gnu,
ftp.informatik.tu-muenchen.de, ftp.win.tue.nl:/pub/gnu,
ftp.funet.fi:/pub/gnu, ftp.denet.dk, ftp.stacken.kth.se, isy.liu.se,
ftp.luth.se:/pub/unix/gnu, ftp.sunet.se:/pub/gnu, archive.eu.net
SOUTH AMERICA: ftp.unicamp.br:/pub/gnu
WESTERN CANADA: ftp.cs.ubc.ca:/mirror2/gnu
USA: wuarchive.wustl.edu:/systems/gnu, labrea.stanford.edu,
ftp.digex.net:/pub/gnu, ftp.kpc.com:/pub/mirror/gnu, f.ms.uky.edu:/pub3/gnu,
jaguar.utah.edu:/gnustuff, ftp.hawaii.edu:/mirrors/gnu,
vixen.cso.uiuc.edu:/gnu, mrcnext.cso.uiuc.edu:/pub/gnu,
ftp.cs.columbia.edu:/archives/gnu/prep, col.hp.com:/mirrors/gnu,
++ $CTAN is a CTAN site or a mirror. See ftp.shsu.edu:pub/tex/README.mirrors
for a full list.
++ For more information in general on how to ftp Unix TeX sources, see:
$CTAN:pub/tex/systems/web2c/unixtex.ftp
++ vvv below means a version number like 6.1 or 1.2.4.
- The gzip program. The source is here:
$GNU:gzip-vvv.tar
- The TeX sources from CTAN:
$CTAN:pub/tex/dviware/dvipsk/dvipsk.tar.gz
$CTAN:pub/tex/systems/web2c/web2c.tar.gz
$CTAN:pub/tex/systems/web2c/web.tar.gz
$CTAN:pub/tex/systems/web2c/lib.tar.gz
At the time of writing, the latest version of web2c is 6.1. If that is still
the case, you will also need the following two patch files:
$CTAN:pub/tex/systems/web2c/web2c.alloca.help
$CTAN:pub/tex/systems/web2c/web2c.kpathsea-2.4.help
You do not actually need to get lib.tar.gz. It contains the standard
TeX-related font descriptions which are already in the NeXTTeX.pkg. If you
skip it, you will have put your existing NeXT files in the right places in the
hierarchy manually. I recommend avoiding that trouble and I even think it is
easier just to rebuild all the fonts rather than trying to sort out the screen
ones from the printer ones.
- The texview sources are in NeXTTeX.pkg. You can install it from the NeXTStep
CD. It might be available from NeXT (ftp.next.com). I think this is also
the same thing:
$CTAN:pub/tex/systems/unix/next/nexttex.tar.gz
- The patch program. The source is here:
$GNU/patch-2.1.tar.gz
- You may need to get bison, flex, gcc, or all of the above. I haven't tested
without them. Their sources are here:
$GNU/bison-vvv.tar.gz
$GNU/flex-vvv.tar.gz
$GNU/gcc-vvv.tar.gz
* GENERAL INFO
The following will install TeX and friends into the default directory
hierarchy. For further customizing, see kpathsea.info.
The NeXTTeX.pkg source patch simply changes path names in the texview program
and in the Make_Fonts script. Also, they are changed slightly to send the
right information to the new MakeTeXPK script.
* IMPORTANT DETAILS
Scan these briefly before proceeding to the STEP BY STEP section.
** Metafont modes:
dvipsk-5.58c's behavior with the -D commandline option requires that you
create $TEXMF/dvips/config.$printer, where $printer is your printer's name,
with the single line
M mode
where mode is the right metafont mode for your printer, or printing from
texview will not work right. The right metafont mode for the NeXT printer is
"nexthi".
** Expansion in texmf.cnf:
In web2c-6.1 there is a bug that causes ~ to sometimes not get expanded
properly. Use $HOME instead.
** texview functionality:
I have patched texview, but not come close to making it into a tool with the
versatility of the kpathsea library. In particular, texview was designed
around a pathlist of PKFONTS, set in paths.h. I have set the path for pk fonts
to be:
.:/usr/local/lib/texmf/fonts/public/cm/pk/nextscreen:/usr/local/lib/texmf/fonts/tmp/pk/nextscreen
which should cover the standard places for the standard TeX CM fonts. When
texview calls MakeTeXPK to build a font, the font will be built in the
MakeTeXPK default, i.e. $TEXMF/fonts/tmp/pk/$mode. When Make_Fonts builds
fonts, however, we know that they are going to be CM fonts, so we place them
directly in /usr/local/lib/texmf/fonts/public/cm/pk/$mode. These paths are
_not_ going to change with texmf.cnf or $TEXMF, they are hard-wired.
There are a handful of environment variables that will affect the texview
paths; I have neither coordinated nor decoordinated them with those of the
kpathsea libraries. In fact, I have done nothing about them. Where
the environment variables are used by both programs, they may need to be in
differnt forms. Use environment variables at your own risk!
In the original texview, the 300 and 400 magnifications were handled as special
cases that tried to use 300 and 400 dpi fonts that could also be used for the
printer. I have removed them because I could not get them to work, nor could I
get any other new magnifications to work. The code for doing all this is not
simple, and I don't have time right now to track it down. If someone figures
how to recover some higher magnifications, please let me know, and one of us
can post a new patch.
* STEP BY STEP
1) Have the right permissions to install software.
2) Check your environment variables to make sure nothing is set that will
affect the build, that you don't know about. DEFS, CC, CFLAGS, and
anything to do with TeX and friends could all possibly mess things up.
3) Unpack lib.tar.gz while in /usr/local/lib. Unpack web2c-vvv.tar.gz,
web-vvv.tar.gz, and dvipsk-vvv.tar.gz in your favorite source directory;
let's call it $src. You will end up with a lot of files in
/usr/local/lib/texmf, and in $src/web2c-vvv.
4) If the web2c version is greater than 6.1, skip to step 7. Otherwise,
execute these commands, which transfer the TeX sources into the environment
with the new kpathsea library:
mv web2c-6.1/web2c dvipsk-5.58c && rm -rf web2c-6.1 \
&& mv dvipsk-5.58c web2c-6.1 && cd web2c-6.1a
5) Assuming the patch files are in $dir,
mv $dir/web2c.kpathsea-2.4.help .
mv $dir/web2c.alloca.help .
6) Patch with the patches:
patch -p < web2c.kpathsea-2.4.help
patch -p < web2c.alloca.help
% check what dir the the alloca patch should be in.
There should be output but no errors.
7) If the web2c version is 6.1, skip to step 8. Otherwise, do
mv dvips-vvv/dvipsk web2c-vvv && rm -rf dvips-vvv
8) If you want to make any changes in the default installation, now is the
time. See the suggested ones below. Notice the deafult installation
assumes that the latex.fmt is LaTeX2e. Then do:
configure
9) Make sure TeX will find the standard library files. If you are using
lib.tar.gz, you don't need to do anything. If you are using the old
distributions, you will have to set TEXINPUTS and/or MFINPUTS. See
kpathsea.info.
10) Follow the normal installation procedure described in the INSTALL files.
Remember to build the database with:
ls -R /usr/local/lib/texmf > /usr/local/lib/texmf/ls-R
11) Now we build a new texview and a new Make_Fonts script. Assuming your
NeXTTeX sources are in the standard place:
cd /NextLibrary/TeX/tex/src/texview
12) Apply the patch. First, we move Make_Fonts into this directory so that we
can patch it in one step. Then, assuming the patch is called $patch,
cp -i /usr/bin/Make_Fonts . && tail -235 $patch | patch
You should get output but no errors.
If you are installing with a nonstandard TeX hierarchy, you may wish to
edit some of the files now. See the IMPORTANT DETAILS section above.
Examining the patch file itself is a good way to see where you might want
to make a change.
13) Move the new script to the new location:
mv -i Make_Fonts /usr/local/bin
14) Now rebuild:
/bin/make install && /bin/make clean
You have to use NeXT's original make. GNU's won't work.
15) I recommend deinstalling the entire NeXTTeX.pkg now, with the Installer
program. This is safe since the new version is in /LocalApps.
* SUGGESTED CUSTOMIZATIONS
Here are the changes I choose to make.
I optimized with "make CFLAGS=-O2". You can also change CFLAGS in the
top-level Makefile. (This is unnecessary when building texview.)
I made the following change to web2c-6.1/web2c/lib/c-auto.h.in:
- I set a #define so that Metafont's window output would use a NeXT window;
you can also use X if you have a developer distribution.
I made the following two changes to texmf.cnf.in:
- I altered the standard search path to include ~/Library/TeX/tex
after the current directory and before the standard ones.
- I altered the BibTeX search paths to include ~/Library/TeX/bibtex/bib
for bibliographies, and ~/Library/TeX/bibtex/bst for bibliography
styles.
The last two changes show up in texmf.cnf, which you can edit in the sources,
or where it gets installed in $TEXMF/texmf.cnf
* DISCLAIMER AND SIGNATURE
This patch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Matt Swift
<swift@bu.edu>
8 December 1994
Member, League for Programming Freedom
Protect your freedom to write programs:
write league@prep.ai.mit.edu for more information.
* THE PATCH
-------snip-snip-snip---------------------------------------
diff -c -r -P texview.orig/Make_Fonts texview/Make_Fonts
*** texview.orig/Make_Fonts Thu Dec 8 17:55:22 1994
--- texview/Make_Fonts Thu Dec 8 18:43:07 1994
***************
*** 136,151 ****
echo " "
exit
fi
- (cd /LocalLibrary/Fonts/TeXFonts/pk; cp * /usr/lib/tex/fonts/pk; rm *)
- echo "If there were errors above, ignore them."
echo "Be prepared to wait a while, now!"
( while read dpi mag
do
for name in \`cat \$names\`
do
! MakeTeXPK \$name \$dpi \$bdpi \$mag
done
- (cd /LocalLibrary/Fonts/TeXFonts/pk; cp * /usr/lib/tex/fonts/pk; rm *)
done ) <\$pairs
EOF
chmod +x temp-aux
--- 136,148 ----
echo " "
exit
fi
echo "Be prepared to wait a while, now!"
( while read dpi mag
do
for name in \`cat \$names\`
do
! MakeTeXPK \$name \$dpi \$bdpi \$mag \$mode /usr/local/lib/texmf/fonts/public/cm/pk/\$mode
done
done ) <\$pairs
EOF
chmod +x temp-aux
diff -c -r -P texview.orig/TeXviewObject.m texview/TeXviewObject.m
*** texview.orig/TeXviewObject.m Thu Dec 8 20:53:36 1994
--- texview/TeXviewObject.m Thu Dec 8 21:35:13 1994
***************
*** 111,118 ****
[popup changeButtonTitle:YES] ; /* we'll do it ourselves */
for (i=1; i<13; i++)
[popuplist addItem:dpistring(existsize100[i])] ;
- [popuplist addItem:dpistring(300)] ;
- [popuplist addItem:dpistring(400)] ;
NXAttachPopUpList(anObject, popuplist) ;
[popup setAction:@selector(cdpi:)] ;
[popup setTarget:myTeXviewObject] ;
--- 111,116 ----
diff -c -r -P texview.orig/dviAccessors.c texview/dviAccessors.c
*** texview.orig/dviAccessors.c Thu Dec 8 20:53:37 1994
--- texview/dviAccessors.c Thu Dec 8 21:34:37 1994
***************
*** 16,22 ****
extern void reportname() ;
extern Boolean zoomed, mocked ;
extern real screendpi, userdpi[], possibmag[] ;
! extern int *existsize, existsize100[], existsize300[], existsize400[] ;
extern int actualdpi ;
extern FILE *dvifile ;
extern Boolean pagedrawn ;
--- 16,22 ----
extern void reportname() ;
extern Boolean zoomed, mocked ;
extern real screendpi, userdpi[], possibmag[] ;
! extern int *existsize, existsize100[] ;
extern int actualdpi ;
extern FILE *dvifile ;
extern Boolean pagedrawn ;
***************
*** 298,318 ****
{
int dpi ;
real ndpi ;
dpi = atol(s) ;
! if (dpi == 300 || dpi == 400) {
! existsize = ((dpi == 300) ? existsize300 : existsize400) ;
! actualdpi = dpi ;
! ndpi = dpi ;
! } else {
! int i ;
! existsize = existsize100 ;
! actualdpi = 100 ;
! for (i=1; i<20; i++)
! if (dpi==existsize[i])
! break ;
! ndpi = possibmag[i + 16] ;
! }
if (screendpi != ndpi) {
userdpi[zoomed] = ndpi ;
screendpi = ndpi ;
--- 298,312 ----
{
int dpi ;
real ndpi ;
+ int i ;
dpi = atol(s) ;
! existsize = existsize100 ;
! actualdpi = 100 ;
! for (i=1; i<20; i++)
! if (dpi==existsize[i])
! break ;
! ndpi = possibmag[i + 16] ;
if (screendpi != ndpi) {
userdpi[zoomed] = ndpi ;
screendpi = ndpi ;
diff -c -r -P texview.orig/makefont.c texview/makefont.c
*** texview.orig/makefont.c Thu Dec 8 20:53:38 1994
--- texview/makefont.c Thu Dec 8 20:52:12 1994
***************
*** 63,69 ****
if ((command=getenv("MAKETEXPK")))
command = newstring(command) ;
else
! command = "MakeTeXPK %n %d %b %m" ;
}
for (p=command, q=buf; *p; p++)
if (*p != '%')
--- 63,69 ----
if ((command=getenv("MAKETEXPK")))
command = newstring(command) ;
else
! command = "MakeTeXPK %n %d %b %m nextscreen" ;
}
for (p=command, q=buf; *p; p++)
if (*p != '%')
diff -c -r -P texview.orig/paths.h texview/paths.h
*** texview.orig/paths.h Thu Dec 8 20:53:38 1994
--- texview/paths.h Thu Dec 8 20:52:13 1994
***************
*** 3,18 ****
* All Rights Reserved.
*/
/*
! * This is the paths file for dviamiga.
*/
/*
* PKPATH is where to search for packed files, directories separated by
* commas. A period means the current directory (don't prepend anything.)
* TFMPATH is the same for TFM files.
*/
! #define TFMPATH ".:/LocalLibrary/Fonts/TeXFonts/tfm:/usr/lib/tex/fonts/tfm"
! #define PKPATH ".:/LocalLibrary/Fonts/TeXFonts/pk:/usr/lib/tex/fonts/pk"
! #define VFPATH ".:/LocalLibrary/Fonts/TeXFonts/vf:/usr/lib/tex/fonts/vf"
#define RESFONTSFILE "psfonts.map"
! #define CONFIGPATH ".:/usr/lib/tex/ps"
! #define INPUTSPATH ".:/usr/lib/tex/inputs"
--- 3,20 ----
* All Rights Reserved.
*/
/*
! * This is a paths file for the standard CTAN and kpathsea Unix TeX
! * hierarchy for a NeXT and LaTeX2e.
*/
/*
* PKPATH is where to search for packed files, directories separated by
* commas. A period means the current directory (don't prepend anything.)
* TFMPATH is the same for TFM files.
*/
!
! #define TFMPATH ".:/usr/local/lib/texmf/fonts/public/cm/tfm"
! #define PKPATH ".:/usr/local/lib/texmf/fonts/public/cm/pk/nextscreen:/usr/local/lib/texmf/fonts/tmp/pk/nextscreen"
! #define VFPATH ".:/usr/local/lib/texmf/fonts/public/cm/vf"
#define RESFONTSFILE "psfonts.map"
! #define CONFIGPATH ".:/usr/local/lib/texmf/dvips"
! #define INPUTSPATH ".:/usr/local/lib/texmf/tex/latex2e/base"
diff -c -r -P texview.orig/pots.c texview/pots.c
*** texview.orig/pots.c Thu Dec 8 20:53:38 1994
--- texview/pots.c Thu Dec 8 20:52:13 1994
***************
*** 29,35 ****
extern void reportnewdpi() ;
extern void TPSdefres() ;
extern int actualdpi ;
! extern int *existsize, existsize100[], existsize300[], existsize400[] ;
/*
* functions we use
*/
--- 29,35 ----
extern void reportnewdpi() ;
extern void TPSdefres() ;
extern int actualdpi ;
! extern int *existsize, existsize100[] ;
/*
* functions we use
*/
***************
*** 142,154 ****
* If the dots per inch change, we call this to redo everything.
*/
void newdpi() {
! if (screendpi == 300.0 || screendpi == 400.0) {
! actualdpi = screendpi ;
! existsize = ((screendpi == 300.0) ? existsize300 : existsize400) ;
! } else {
! actualdpi = 100 ;
! existsize = existsize100 ;
! }
recalculate() ;
TPSdefres((double)screendpi) ;
if (dvifile != NULL) {
--- 142,149 ----
* If the dots per inch change, we call this to redo everything.
*/
void newdpi() {
! actualdpi = 100 ;
! existsize = existsize100 ;
recalculate() ;
TPSdefres((double)screendpi) ;
if (dvifile != NULL) {
diff -c -r -P texview.orig/preview.c texview/preview.c
*** texview.orig/preview.c Thu Dec 8 20:53:39 1994
--- texview/preview.c Thu Dec 8 21:02:40 1994
***************
*** 71,80 ****
int existsize100[] = { 0, 69, 76, 83, 91, 100, 110, 120,
131, 144, 158, 173, 189, 207, 227, 249, 273, 299, 327, 358, 393,
430, 471, 516, 565, 619, 678, 743, 814, 892, 977, 1070, 32767 } ;
- int existsize300[] = { 0, 300, 329, 360, 432, 518, 622, 746, 896,
- 1075, 1290, 1548, 32767 } ;
- int existsize400[] = { 0, 400, 438, 480, 576, 691, 829, 995, 1194,
- 1433, 1720, 2064, 32767 } ;
int *existsize = existsize100 ;
real userdpi[] = { 91.2871, 120.0000 } ;
int debugon = 0 ;
--- 71,76 ----